import Vue from 'vue'
import App from './App.vue'
//导入路由
import router from '@/router'
//引入vuex
import store from '@/store'
//引入mock功能
import '@/mock/mockServer'
//引入swiper样式
import 'swiper/css/swiper.min.css'

Vue.config.productionTip = false

//引入全局组件
import TypeNav from '@/components/TypeNav'
import Carousel from '@/components/Carousel'
import Pagination from '@/components/Pagination'
Vue.component(TypeNav.name,TypeNav)
Vue.component(Carousel.name,Carousel)
Vue.component(Pagination.name,Pagination)

new Vue({
  render: h => h(App),
  // 组件实例上多了一个$router属性
  router,
  //组件实例上多了一个$store属性
  store,
  beforeCreate(){
    //全局事件总线
    Vue.prototype.$bus = this
  }
}).$mount('#app')
